<br>
<a href="<?php echo base_url().'user/add' ?>"><img src="<?php echo base_url().'assets/images/2.png' ?>"  />Tambah</a>
<table width="642" border="0" cellpadding="0" cellspacing="0" class="table">
  <tr>
    <th width="32">No</th>
    <th width="325">Username</th>
    <th width="166">Status</th>
    <th width="119">Aksi</th>
  </tr>
  <?php $i=1; ?>
  <?php foreach ($query as $row){?>
  <tr class="<?php if ($i %2 == 0) echo 'zebra';?>">
    <td><?php echo $i ?></td>
    <td><?php echo $row['username'] ?></td>
    <td>
	<?php if( $row['rule'] == '0'){ ?>
		<a href="<?php echo base_url().'user/status/1/'.$row['id_admin'] ?>">Tidak Aktif</a>
	 <?php } else { ?> <a href="<?php echo base_url().'user/status/0/'.$row['id_admin'] ?>">Aktif</a><?php }?></td>
    <td><a href="<?php echo base_url().'user/edit/'.$row['id_admin']?>">Edit </a>
		<a href="<?php echo base_url().'user/delete/'.$row['id_admin']?>">| Delete</a></td>
  </tr>
  <?php
  $i++;
  }?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
